jQuery(function ($) { 'use strict'; // Header Sticky $(window).on('scroll',function() { if ($(this).scrollTop() > 30){ $('.navbar-area').addClass("is-sticky"); } else{ $('.navbar-area').removeClass("is-sticky"); } }); // Mean Menu jQuery('.mean-menu').meanmenu({ meanScreenWidth: "1199" }); // Others Option For Responsive JS $(".others-option-for-responsive .dot-menu").on("click", function(){ $(".others-option-for-responsive .container .container").toggleClass("active"); }); // Search Menu JS $(".others-options .search-box").on("click", function(){ $(".search-overlay").toggleClass("search-overlay-active"); }); $(".search-overlay-close").on("click", function(){ $(".search-overlay").removeClass("search-overlay-active"); }); // TweenMax JS $('.main-banner-area').mousemove(function(e){ var wx = $(window).width(); var wy = $(window).height(); var x = e.pageX - this.offsetLeft; var y = e.pageY - this.offsetTop; var newx = x - wx/2; var newy = y - wy/2; $('.main-banner-shape-1, .main-banner-shape-2, .main-banner-shape-3, .main-banner-shape-4').each(function(){ var speed = $(this).attr('data-speed'); if($(this).attr('data-revert')) speed *= -.4; TweenMax.to($(this), 1, {x: (1 - newx*speed), y: (1 - newy*speed)}); }); }); // Isotop Js var $grid = $('.portfolio-items').isotope({ itemSelector: '.grid-item', percentPosition: true, masonry: { // Use outer width of grid-sizer for columnWidth columnWidth: '.grid-item' } }); // function to set a given theme/color-scheme function setTheme(themeName) { localStorage.setItem('augu_theme', themeName); document.documentElement.className = themeName; } // function to toggle between light and dark theme function toggleTheme() { if (localStorage.getItem('augu_theme') === 'theme-dark') { setTheme('theme-light'); } else { setTheme('theme-dark'); } } // Immediately invoked function to set the theme on initial load (function () { if (localStorage.getItem('augu_theme') === 'theme-dark') { setTheme('theme-dark'); document.getElementById('slider').checked = false; } else { setTheme('theme-light'); document.getElementById('slider').checked = true; } })(); $('.toggle-menu').click(function () { $('.exo-menu').toggleClass('display'); }); });